<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * Install localization template
 *
 * @see \Magento\Install\Block\Locale
 */
?>
<div class="page-head">
    <h3><?php echo __('Localization') ?></h3>
</div>
<?php echo $this->getLayout()->getMessagesBlock()->getGroupedHtml() ?>

<form action="<?php echo $this->getPostUrl() ?>" method="get" id="form-validate">
<fieldset class="group-select">
 <legend><?php echo __('Locale') ?></legend>
    <h4 class="legend"><?php echo __('Locale settings') ?></h4>
    <ul>
        <li>
            <div class="input-box">
                <label for="locale"><?php echo __('Locale') ?> <span class="required">*</span></label><br/>
                <?php echo $this->getLocaleSelect() ?>
            </div>
        </li>
        <li>
            <div class="input-box">
                <label for="timezone"><?php echo __('Time Zone') ?> <span class="required">*</span></label><br/>
                <?php echo $this->getTimezoneSelect() ?>
            </div>
            <div class="input-box">
                <label for="currency"><?php echo __('Default Currency') ?> <span class="required">*</span></label><br/>
                <?php echo $this->getCurrencySelect() ?>
            </div>
        </li>
    </ul>
</fieldset>
<div class="button-set">
    <p class="required">* <?php echo __('Required Fields') ?></p>
    <button class="form-button" type="submit"><span><?php echo __('Continue') ?></span></button>
</div>
</form>
<script type="text/javascript">
require([
    "jquery",
    "Magento_Install/js/install"
], function($){

    $.mage.install.changeLocale('#locale', '<?php echo $this->getChangeUrl();?>');

});
</script>
